home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 12695 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: csus.edu!csus
  2. From: sac46826@csus.edu (Mike Billard)
  3. Newsgroups: comp.lang.c++
  4. Subject: Assertion error help needed
  5. Date: Thu, 21 Mar 96 02:48:10 GMT
  6. Organization: California State University Sacramento
  7. Message-ID: <4iqg2r$itd@news.csus.edu>
  8. NNTP-Posting-Host: @u0107-p16.dialin.csus.edu
  9. X-Newsreader: News Xpress 2.0 Beta #0
  10.  
  11. I have been looking into my assertion failure problem a bit, but I'm still 
  12. having the problem.  To recap:
  13.  
  14. I used MSVC++ 4.0 to build an SDI application and created 
  15. an edit box.  I then mapped a CEdit variable, m_Edit, to the edit control.  
  16. Next, I mapped the WM_INITDIALOG message to OnInitDialog, and in that fuction 
  17. I typed: m_Edit.SetWindowText("Default Text");
  18.  
  19.   When I installed the new MSVC++4.1 and ran the program, I got an assertion 
  20. failure on line 229 of winocc.cpp.  This is different than the last time I 
  21. tried the above but is probably the real problem.  The code in winocc.cpp says
  22.  
  23. Assert(::IsWindow(m_hWnd));  As best as I can tell, the m_Edit variable is not 
  24. initialized.  What I don't understand is that in many tutorials in books like 
  25. Essential Visual C++4, many controls are initialized in the OnInitDialog 
  26. fuction with no problems.  So what am I doing wrong?
  27.  
  28. Thanks in advance.
  29.  
  30. Sincerely,
  31. Mike Billard
  32. billardm@csus.edu
  33.  
  34. -Mike Billard
  35.  
  36. email: billardm@csus.edu
  37.